Skip to content

Conversation

@amber-yujueWang
Copy link
Member

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions
Copy link

github-actions bot commented Nov 20, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-ai-transcription

@amber-yujueWang amber-yujueWang marked this pull request as ready for review November 20, 2025 21:59
Copilot AI review requested due to automatic review settings November 20, 2025 22:00
Copilot finished reviewing on behalf of amber-yujueWang November 20, 2025 22:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a multipart form data handling issue in the Azure AI Transcription SDK by renaming the options parameter to definition in the TranscriptionContent model and updating all references throughout the codebase. The changes are based on an updated API specification (commit hash change in tsp-location.yaml).

Key changes:

  • Renamed TranscriptionContent.options parameter to definition and made it required (previously optional)
  • Updated multipart form data field mapping from "options" to "definition" in both sync and async operations
  • Modified the transcribe_from_url helper method to use a b"\x00\x00" workaround when no audio file is provided

Reviewed Changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tsp-location.yaml Updated API spec commit reference from c75a959c to 5f88489f
azure/ai/transcription/models/_models.py Renamed options to definition in TranscriptionContent model; changed from optional to required parameter
azure/ai/transcription/_operations/_operations.py Updated multipart form data field list to use "definition" instead of "options"
azure/ai/transcription/_operations/_patch.py Added pylint suppression and updated transcribe_from_url to use definition parameter with b"\x00\x00" workaround for audio
azure/ai/transcription/aio/_operations/_operations.py Updated multipart form data field list to use "definition" instead of "options" (async version)
azure/ai/transcription/aio/_operations/_patch.py Added pylint suppression and updated transcribe_from_url to use definition parameter with b"\x00\x00" workaround for audio (async version)
samples/sample_*.py (7 files) Updated all sample files to use definition=options instead of options=options when creating TranscriptionContent
samples/async_samples/sample_*_async.py (6 files) Updated all async sample files to use definition=options instead of options=options
generated_tests/test_transcription.py Updated test body structure to use "definition" field and reordered fields (definition before audio)
generated_tests/test_transcription_async.py Updated test body structure to use "definition" field and reordered fields (definition before audio)
README.md Updated documentation examples to use definition parameter and removed extraneous blank line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant